package Buldo5Pack;

import regres.RegresExperimentable;
import transProcess.TransProcesable;
import process.Dispatcher;
import qusystem.QueueForTransactions;
import process.MultiActor;
import paint.Painter;
import java.awt.Color;


public class BuldoVisualModel implements RegresExperimentable{

	private Dispatcher dispatcher = null;  //  @jve:decl-index=0:visual-constraint="551,39"
	private Buldo5 buldo5 = null;  //  @jve:decl-index=0:visual-constraint="412,93"
	private Heep5 heep5 = null;  //  @jve:decl-index=0:visual-constraint="416,161"
	private loader5 loader5 = null;  //  @jve:decl-index=0:visual-constraint="506,94"
	private Lorry5 lorry5 = null;  //  @jve:decl-index=0:visual-constraint="613,92"
	private QueueForTransactions queueToLoader = null;  //  @jve:decl-index=0:visual-constraint="495,162"
	private QueueForTransactions queueWayTo = null;  //  @jve:decl-index=0:visual-constraint="607,164"
	private QueueForTransactions queueWayFrom = null;  //  @jve:decl-index=0:visual-constraint="691,160"
	private MultiActor MultiLorry = null;  //  @jve:decl-index=0:visual-constraint="696,94"
	private Painter painterHeep = null;  //  @jve:decl-index=0:visual-constraint="402,220"
	private Painter painterToLoader = null;  //  @jve:decl-index=0:visual-constraint="491,219"
	private Painter painterWayTo = null;  //  @jve:decl-index=0:visual-constraint="603,219"
	private Painter painterWayFrom = null;  //  @jve:decl-index=0:visual-constraint="687,219"

	/**
	 * This method initializes dispatcher	
	 * 	
	 * @return process.Dispatcher	
	 */
	@Override
	public process.Dispatcher getDispatcher() {
		if (dispatcher == null) {
			dispatcher = new Dispatcher();
		}
		return dispatcher;
	}

	/**
	 * This method initializes buldo5	
	 * 	
	 * @return Buldo5Pack.Buldo5	
	 */
	private Buldo5 getBuldo5() {
		if (buldo5 == null) {
			buldo5 = new Buldo5();
			buldo5.setDispatcher(getDispatcher());
			buldo5.setHeep(getHeep5());
		}
		return buldo5;
	}

	/**
	 * This method initializes heep5	
	 * 	
	 * @return Buldo5Pack.Heep5	
	 */
	private Heep5 getHeep5() {
		if (heep5 == null) {
			heep5 = new Heep5();
		}
		return heep5;
	}

	/**
	 * This method initializes loader5	
	 * 	
	 * @return Buldo5Pack.loader5	
	 */
	private loader5 getLoader5() {
		if (loader5 == null) {
			loader5 = new loader5();
			loader5.setDispatcher(getDispatcher());
			loader5.setHeep(getHeep5());
			loader5.setAvtoQueue(getQueueToLoader());
		}
		return loader5;
	}

	/**
	 * This method initializes lorry5	
	 * 	
	 * @return Buldo5Pack.Lorry5	
	 */
	private Lorry5 getLorry5() {
		if (lorry5 == null) {
			lorry5 = new Lorry5();
			lorry5.setDispatcher(getDispatcher());
			lorry5.setQueueTo(getQueueWayTo());
			lorry5.setQueueToLoader(getQueueToLoader());
			lorry5.setQueueFrom(getQueueWayFrom());
		}
		return lorry5;
	}

	/**
	 * This method initializes queueToLoader	
	 * 	
	 * @return qusystem.QueueForTransactions	
	 */
	private QueueForTransactions getQueueToLoader() {
		if (queueToLoader == null) {
			queueToLoader = new QueueForTransactions();
			queueToLoader.setDispatcher(getDispatcher());
			queueToLoader.setPainter(getPainterToLoader());
		}
		return queueToLoader;
	}

	/**
	 * This method initializes queueWayTo	
	 * 	
	 * @return qusystem.QueueForTransactions	
	 */
	private QueueForTransactions getQueueWayTo() {
		if (queueWayTo == null) {
			queueWayTo = new QueueForTransactions();
			queueWayTo.setDispatcher(getDispatcher());
			queueWayTo.setPainter(getPainterWayTo());
		}
		return queueWayTo;
	}

	/**
	 * This method initializes queueWayFrom	
	 * 	
	 * @return qusystem.QueueForTransactions	
	 */
	private QueueForTransactions getQueueWayFrom() {
		if (queueWayFrom == null) {
			queueWayFrom = new QueueForTransactions();
			queueWayFrom.setDispatcher(getDispatcher());
			queueWayFrom.setPainter(getPainterWayFrom());
		}
		return queueWayFrom;
	}

	/**
	 * This method initializes MultiLorry	
	 * 	
	 * @return process.MultiActor	
	 */
	private MultiActor getMultiLorry() {
		if (MultiLorry == null) {
			MultiLorry = new MultiActor();
			MultiLorry.setOriginal(getLorry5());
			MultiLorry.setDispatcher(getDispatcher());
		}
		return MultiLorry;
	}

	/**
	 * This method initializes painterHeep	
	 * 	
	 * @return paint.Painter	
	 */
	private Painter getPainterHeep() {
		if (painterHeep == null) {
			painterHeep = new Painter();
			painterHeep.setColor(Color.blue);
		}
		return painterHeep;
	}

	/**
	 * This method initializes painterToLoader	
	 * 	
	 * @return paint.Painter	
	 */
	private Painter getPainterToLoader() {
		if (painterToLoader == null) {
			painterToLoader = new Painter();
			painterToLoader.setColor(Color.red);
		}
		return painterToLoader;
	}

	/**
	 * This method initializes painterWayTo	
	 * 	
	 * @return paint.Painter	
	 */
	private Painter getPainterWayTo() {
		if (painterWayTo == null) {
			painterWayTo = new Painter();
			painterWayTo.setColor(Color.orange);
		}
		return painterWayTo;
	}

	/**
	 * This method initializes painterWayFrom	
	 * 	
	 * @return paint.Painter	
	 */
	private Painter getPainterWayFrom() {
		if (painterWayFrom == null) {
			painterWayFrom = new Painter();
			painterWayFrom.setColor(Color.orange);
		}
		return painterWayFrom;
	}

	@Override
	public double getResult() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public void setFactor(double w) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void startExperiment() {
		// TODO Auto-generated method stub
		
	}

}
